/*
 contains file data types

 structure of file is as follows:

 FileTreeHeader
 char buf[FileTreeHeader.tree_size]

 */

#pragma once

#include <stdint.h>

typedef uint32_t    FileChar;
typedef int32_t     FileOffset;
typedef int32_t     FileInt;


#pragma pack(push, 1)

#define FILE_TREE_HEADER_MAGIC  (0x7C62454A)

struct FileTreeHeader
{
    FileInt     magic;
    FileOffset  root_node_offset;
    FileOffset  tree_size;
};

struct FileEntry
{
    FileChar    character;

    FileOffset  node_offset;
};

struct FileNode
{
    FileOffset  parent_node_offset;

    FileInt     entry_count;
};

#pragma pack(pop)
